// interface UserInfo  {
//     name:string
//     password:string
// }
type UserInfo = {
    name:string,
    password:string
}
interface dataType {
    [propsName:string]:string|number
}
import request from "@/utils/request";
const baseURL = "http://dida100.com:8888"
export function Login(data:UserInfo){
      
    return request.post(baseURL+"/api/login",data)
}

export function GetCart(){
    return request.get(baseURL+'/api/cart')
}

export function GetCategory(){
    return request.get(baseURL+'/api/yp/category')
}

export function GetUser(params:dataType){
    return  request.get(baseURL+'/api/user',{params:params})
}

export function GetShop(params:dataType){
    return request.get(baseURL+"/api/yp/shop",{params})
}

export function GetUpImg(params:dataType){
    return request.get(baseURL+"/api/yp/upimg",{params})
}